﻿@using KRM.Core

@using KRM.Core.Library
@model KRM.Core.tblEmail

@{
    Layout = "~/Views/Shared/_HRLayout.cshtml";
}
<script src="/js/mail.js"></script>
<script src="/hr/js/plugins/ckeditor/ckeditor.js"></script>

<form action="/EmailTicket/SendMail" id="frReplyEmail" method="POST" class="form-horizontal" role="form" enctype="multipart/form-data">
    <input type="hidden" id="CountAttachment" name="CountAttachment" value="1" />
    <input type="hidden" id="IsFull" name="IsFull" value="True" />
    <input type="hidden" id="EmailID" name="MailID" value="@Model.EmailID"/>
    <input type="hidden" name="UserID" id="UserID" value="@Users.Current(User.Identity.Name).UserID"/>
    <input type="hidden" name="UserEmail" id="UserEmail" value="@Users.Current(User.Identity.Name).MyEmail"/>
    <!-- BEGIN SAMPLE FORM PORTLET-->
    <div class="portlet box green ">
        <div class="portlet-title">
            <div class="caption">
                Reply Email
            </div>
        </div>
        <div class="portlet-body form">
            <div class="form-body">
                <div class="form-group">
                    <label class="col-md-3 control-label">To</label>
                    <div class="col-md-9">
                        <div class="input-group">
                            <span class="input-group-addon"><i class="icon-envelope"></i></span>
                            <input id="To" type="email" name="To" class="form-control" placeholder="" value="@Model.From">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-md-3 control-label">Subject</label>
                    <div class="col-md-9">
                        <input id="Subject" name="Subject" type="text" class="form-control"  placeholder="" value ="Re: @Model.Subject">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-3 control-label">Content</label>
                    <div class="col-md-9">
                        <textarea class="form-control ckeditor" rows="15" id="txtContent" name="Content" style="visibility: hidden; display: none;">
                                      <br /><br />
                                      ------------------------ Original message -------------------------------
                                     <br />
                                     @Html.Raw(@Model.Body)


                                 </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputFile" class="col-md-3 control-label">
                        File input
                                  <br />
                        <small><a onclick="AddMoreAttachment()">More attachment</a></small>
                    </label>
                    <div class="col-md-9">
                        <input type="file" id="InputFile1" name="InputFile1">
                    </div>
                </div>
                <div id="divMoreAttachment">
                </div>
            </div>
        </div>
    </div>

    <!-- END SAMPLE FORM PORTLET-->



    <div class="modal-footer">
        <a class="btn btn-default" href="/EmailTicket/">Cancel</a>
        <button type="submit" id="btnAccept" class="btn btn-success" onclick="">Send</button>
    </div>
</form>
